﻿<?php
/**
 * @package Joomla
 * @subpackage Jmonoslideshow
 * @copyright (C) 2010 - Matthieu BARBE - www.ccomca.com
 * @license GNU/GPL v2
 * 
 * Jmonoslideshow is a Joomla extension for Monoslideshow.
 *
 * Jmonoslideshow uses :
 * Monoslideshow (http://www.monoslideshow.com/)
 * Plupload (http://www.plupload.com/) by Moxicode Systems
 * json class by Michal Migurski, Matt Knapp, Brett Stimmerman
 * jquery a JavaScript Library (http://jquery.com/)
 * getid3 library (http://getid3.sourceforge.net/)
 * swfobject is an easy-to-use and standards-friendly method to embed Flash content, which utilizes one small JavaScript file (http://code.google.com/p/swfobject/)
 * Chained Selects jQuery Plugin (http://www.appelsiini.net/2010/jquery-chained-selects)
 *
 * Jmonoslideshow is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

//load css
JHTML::stylesheet( 'monoslideshow.css', 'administrator/components/com_jmonoslideshow/assets/css/' );



$db =& JFactory::getDBO();
$nullDate 		= $db->getNullDate();
$params = &JComponentHelper::getParams( 'com_jmonoslideshow' );
jimport('joomla.environment.uri' );

?>

<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
	var form = document.adminForm;
	if (pressbutton == 'cancel') {
		submitform( pressbutton );
		return;
	}
	if (form.title.value == ""){
		alert( "<?php echo JText::_( 'COM_JMONOSLIDESHOW_YOU_MUST_ENTER_A_TITLE' );  ?>" );
	}
	
	
	else {
		submitform( pressbutton );
	}
}
</script>



<form action="index.php" method="post" name="adminForm" id="adminForm" >
<div class="col100">

<table cellspacing="0" cellpadding="0" border="0" width="100%">
		<tr>
			<td valign="top">


	<fieldset class="adminform">
		<legend><?php echo JText::_( 'COM_JMONOSLIDESHOW_DETAILS' ); ?></legend>

		<table class="admintable">
		<tr>
			<td width="100" align="right" class="key">
				<label for="title">
					<?php echo JText::_( 'COM_JMONOSLIDESHOW_TITLE' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="title" id="title" size="32" maxlength="250" value="<?php echo $this->album->title;?>" />
			</td>
		</tr>
        
        <tr>
			<td width="100" align="right" class="key">
				<label for="description">
					<?php echo JText::_( 'COM_JMONOSLIDESHOW_DESCRIPTION' ); ?>:
				</label>
			</td>
			<td>
				<textarea name="description" cols="30" rows="10"><?php echo $this->album->description;?></textarea>
		  </td>
		</tr>
        <?php if (!$this->isNew) : ?>
          <tr>
			<td width="100" align="right" class="key">
				<label for="published">
					<?php echo JText::_( 'COM_JMONOSLIDESHOW_PUBLISHED' ); ?>
				</label>
			</td>
			<td>
				<?php echo $this->lists['published']; ?>
		  </td>
		</tr>
        
        <?php endif ?>
          
      
        
 
       
		
	</table>
	</fieldset>
    </td>
    <td width="250" valign="top">
    
     <?php
			$title = JText::_( 'COM_JMONOSLIDESHOW_INFORMATION' );
			echo $this->pane->startPane( 'stat-pane' );
			echo $this->pane->startPanel( $title, 'information' );
			
			?>
            
             <table>
	 
	  <tr>
		  <td nowrap="nowrap"><label for="created"><?php echo JText::_('COM_JMONOSLIDESHOW_MEDIA_CREATED') ?> :</label></td>
		  <td width="100%">
          <?php
				if ( $this->album->created == $nullDate ) {
					echo JText::_( 'COM_JMONOSLIDESHOW_NEW_MEDIA' );
				} else {
					echo JHTML::_('date',  $this->album->created,  JText::_('DATE_FORMAT_LC2') );
				}
				?>
          
          </td>
	  </tr>
      <tr>
		<td><label for="author"><?php echo JText::_('COM_JMONOSLIDESHOW_AUTHOR') ?> : </label></td>
		<td>
		<?php
        $author =& JFactory::getUser($this->album->author);
		echo $author->name;
		

		?>
        </td>
	  </tr>
      
      
      <tr>
		  <td nowrap="nowrap"><label for="modified"><?php echo JText::_('COM_JMONOSLIDESHOW_MEDIA_MODIFIED') ?> :</label></td>
		  <td width="100%">
          <?php
				if ( $this->album->modified == $nullDate ) {
					echo JText::_( 'COM_JMONOSLIDESHOW_NEW_MEDIA' );
				} else {
					echo JHTML::_('date',  $this->album->modified,  JText::_('DATE_FORMAT_LC2') );
				}
				?>
          
          </td>
	  </tr>
      
      
       <tr>
		<td><label for="modified_by"><?php echo JText::_('COM_JMONOSLIDESHOW_MODIFIED_BY') ?> : </label></td>
		<td>
		<?php
        $modified_by =& JFactory::getUser($this->album->modified_by);
		echo $modified_by->name;
		

		?>
        </td>
	  </tr>
      </table>
            
            
            <?php
			echo $this->pane->endPanel();
			
			
			
			echo $this->pane->endPane();
			
			?>
    
    </td></tr></table>
</div>
<div class="clr"></div>

<input type="hidden" name="option" value="com_jmonoslideshow" />
<input type="hidden" name="id" value="<?php echo $this->album->id; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="controller" value="categories" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>